﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SelectPic.aspx.cs" Inherits="Web.SelectPic" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script type="text/javascript" language="javascript">
function info(smileface)
{
    //parent.document.PostForm.QuesTypeId="abc";
    var oEditor = parent.FCKeditorAPI.GetInstance('Title') ;
	oEditor.InsertHtml('<img src="../../'+smileface+'" border=0>') ;
    $(".boxy-modal-blackout",parent.document).remove();
    $("#boxyssss",parent.document).remove();
}

</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>图库</title>
    <link href="css/minicss.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery-1.3.2.min.js" language="javascript" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div id='block'>
    <div id='blocktitle'>点击需要的图片即可插入</div>
    <div id='blockfloor'>
        <asp:DropDownList ID="SubjectList" runat="server" AutoPostBack="True" 
            onselectedindexchanged="SubjectList_SelectedIndexChanged">
        </asp:DropDownList>
        <asp:TextBox ID="Keyword" runat="server" Width="250"></asp:TextBox>
        <asp:Button ID="Button1" runat="server" Text="搜索" onclick="Button1_Click" />
    </div>
    <div id="blockcontent">
        <asp:ListView ID="FilesList" runat="server">
        <LayoutTemplate><div id='piclist'><asp:Label ID="itemPlaceholder" runat="server" Text="Label"></asp:Label></div></LayoutTemplate>
<ItemTemplate>
        <dl><dt><a href='javascript:info("<%# Eval("Patch")%><%# Eval("FileName")%>");'><img src='<%# Eval("Patch")%><%# Eval("Minipic")%>' /></a></dt><dd><%# Eval("Name")%><em><a href='SelectPic.aspx?editid=<%# Eval("ID")%>'>编辑</a></em></dd></dl>
            </ItemTemplate>
        
        </asp:ListView>
    </div>
    <div id='blockfloor'><asp:Label ID="PageLabel" runat="server" Text=""></asp:Label></div>
    <div id='blocktitle'>图片上传</div>
    <div id='blockcontent' class="uppic">
    <p><label for="Name">名称：</label><asp:TextBox ID="Name" runat="server"></asp:TextBox><label for="SubjectIdList">类别：</label><asp:DropDownList ID="SubjectIdList" runat="server"> </asp:DropDownList></p>
    <p><label for="FileUpload1">选择文件：</label><asp:FileUpload ID="FileUpload1" runat="server" /></p>
    <p class="center"><asp:Button ID="save" runat="server" Text="保 存" OnClick="save_Click" /></p>
    </div>
    </div>
    </form>
</body>
</html>
